
<? if (count($objects) > 0): ?>

        <div id="filter" class="frm_color">
            
            <div id="filter_wrap">

            <h3 class="filter_by"><?= lang('filter.filter_by'); ?></h3>



            <div class="collapse-filter accordion">

                <h3 class="filter_title filtercategory"><?= lang('filter.price'); ?></h3>


                <div class="filteroptions" id="filter_price">

                    <? if (isset($unique_prices['0,50'])): ?>

                        <a data-category="filter_price" data-id="0,50" class="filterelement inactive" href="javascript:" rel="nofollow">

                            <div class="filter_item clearfix"><span>€&nbsp;0 - €&nbsp;49</span> (<?= $unique_prices['0,50']->cnt ?>)</div>

                        </a>

                    <? endif; ?>

                    <? if (isset($unique_prices['50,100'])): ?>
                        <a data-category="filter_price" data-id="50,100" class="filterelement inactive" href="javascript:" rel="nofollow">

                            <div class="filter_item clearfix"><span>€&nbsp;50 - €&nbsp;99</span> (<?= $unique_prices['50,100']->cnt ?>)</div>

                        </a>
                    <? endif; ?>

                    <? if (isset($unique_prices['100,150'])): ?>
                        <a data-category="filter_price" data-id="100,150" class="filterelement inactive" href="javascript:" rel="nofollow">

                            <div class="filter_item clearfix"><span>€&nbsp;100 - €&nbsp;149</span> (<?= $unique_prices['100,150']->cnt ?>)</div>

                        </a>
                    <? endif; ?>

                    <? if (isset($unique_prices['150,200'])): ?>
                        <a data-category="filter_price" data-id="150,200" class="filterelement inactive" href="javascript:" rel="nofollow">

                            <div class="filter_item clearfix"><span>€&nbsp;150 - €&nbsp;199</span> (<?= $unique_prices['150,200']->cnt ?>)</div>

                        </a>
                    <? endif; ?>

                    <? if (isset($unique_prices['200,-1'])): ?>
                        <a data-category="filter_price" data-id="200,-1" class="filterelement inactive" href="javascript:" rel="nofollow">

                            <div class="filter_item clearfix"><span>€&nbsp;200 +</span> (<?= $unique_prices['200,-1']->cnt ?>)</div>

                        </a>
                    <? endif; ?>

                </div>






                <h3 class="filter_title filtercategory"><?= lang('filter.star_rating'); ?></h3>


                <div class="filteroptions" id="filter_stars">

                    <?
                    foreach ($unique_stars as $key => $value):
                        if ($key != 0):
                            ?>

                            <a data-category="filter_stars" data-id="<?= $key ?>" class="filterelement inactive" href="javascript:" rel="nofollow">

                                <div class="filter_item clearfix"><span><?= $key ?> <?= $key == 1 ? lang('filter.star') : lang('filter.stars') ?></span> (<?= $value ?>)</div>

                            </a>

                            <?
                        endif;
                    endforeach;
                    ?>

                    <? if (isset($unique_stars[0])): ?>

                        <a data-category="filter_stars" data-id="0" class="filterelement inactive" href="javascript:" rel="nofollow">

                            <div class="filter_item clearfix"><span><?= lang('filter.unrated'); ?></span> (<?= $unique_stars[0] ?>)</div>

                        </a>

                    <? endif; ?>

                </div>


                <h3 class="filter_title filtercategory"><?= lang('filter.hotel_type'); ?></h3>


                <div class="filteroptions" id="filter_unique_acc_type">

                     <?
                    foreach ($unique_acc_type as $type):
                            ?>

                            <a data-category="filter_acc_type" data-id="<?= $type->id ?>" class="filterelement inactive" href="javascript:" rel="nofollow">

                                <div class="filter_item clearfix"><span><?= lang('filter.'.$type->id) ?> </span> (<?= $type->cnt ?>)</div>

                            </a>

                            <?
                    endforeach;
                    ?>



                </div>

                <h3 class="filter_title filtercategory"><?= lang('filter.facility'); ?></h3>

                <div class="filteroptions" id="filter_facilities_services">

                    <?
                    if (isset($unique) && count($unique) > 0)
                        foreach ($unique as $attribute):
                            ?>

                            <a data-category="filter_facilities" data-id="<?= $attribute->id ?>" class="filterelement inactive" href="javascript:" rel="nofollow">

                                <div class="filter_item clearfix"><span><?= $attribute->title ?></span> (<?= $attribute->cnt ?>)</div>

                            </a>

                        <? endforeach; ?>

                </div>

            </div>
            
            </div>

        </div>
    <? endif; ?>